package demo_0423;

import java.util.*;

public class ThreeSets {
    public static void main(String[] args) {
        /*三种Set的区别：

        */
        Set<String> set1 = new TreeSet<>(Arrays.asList("apple", "banana", "grape", "pear", "orange"));
        System.out.println(set1);
        //
        Set<String> set2 = new LinkedHashSet<>(Arrays.asList("apple", "banana", "grape", "pear", "orange" ));
        System.out.println(set2);
        //
        Set<String> set3 = new TreeSet<>(Arrays.asList("apple", "banana", "grape", "pear", "orange" ));
        System.out.println(set3);

    }
}
